#!/bin/bash

API=29
OS=android
ARCH=arm64
CPU=armv8-a
CFLAGS="-Os"




sopath=/mnt/nas/vs/android-build-ffmpeg/bulid
# h264
function buildh264
{

export ANDROID_ABI=arm-linux-androideabi # 或者其他你需要支持的ABI
export ANDROID_API=21 # 根据你的需求选择合适的API版本
export CFLAGS="-I$ANDROID_NDK/sysroot/usr/include/android $CFLAGS"
export CPPFLAGS="-I$ANDROID_NDK/sysroot/usr/include/android $CPPFLAGS"
export LDFLAGS="-L$ANDROID_NDK/sysroot/usr/lib/android/$ANDROID_API $LDFLAGS"


./configure --prefix=/mnt/nas/vs/android-build-ffmpeg/bulid-android/gru --host=$ANDROID_ABI --build=x86_64-linux-gnu \
            --disable-guile --disable-hardware-acceleration \
            --disable-non-batch --enable-local-libopts --disable-c++ \
            --disable-fortify --disable-gcc-warnings --with-included-unistring









make -j4
make install

}

rm -rf gnutls-3.7.0
tar -xvf gnutls-3.7.0.tar.xz
cd gnutls-3.7.0
# gnutls-3.7.0 编译
cd gnutls-3.7.0
API=23
CPU=armv7a

buildh264